package com.zxx.casserver.modules.permission.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

/**
 * <p>
 * 权限菜单管理-数据库使用
 * </p>
 *
 * @author zhoukai
 * @since 2020-08-03
 */
@TableName("cas_permission")
public class PermissionDO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 权限主键
     */
    @TableId(value = "permission_id", type = IdType.AUTO)
    private Integer permissionId;

    /**
     * 所属应用ID
     */
    private Long appId;

    /**
     * 父节点code
     */
    private String pcode;

    /**
     * 所有节点之间的关联路径，比如[1][2]表示[1]为当前父节点[2]为1的下级节点
     */
    private String pcodes;

    /**
     * 权限名称
     */
    private String name;

    /**
     * 权限类型：1表示菜单  2表示权限
     */
    private Integer type;

    /**
     * 跳转链接
     */
    private String url;

    /**
     * 权限层级：默认1
     */
    private Integer level;

    /**
     * 排序：越小越在前面
     */
    private Integer sort;

    /**
     * 权限图标
     */
    private String icon;

    /**
     * 是否展示：1展示  2不展示
     */
    private Integer showStatus;

    /**
     * 状态：1 生效、2不生效
     */
    private Integer status;

    /**
     * 创建时间
     */
    private Long createTime;

    /**
     * 更新时间
     */
    private Long updateTime;


    public Integer getPermissionId() {
        return permissionId;
    }

    public void setPermissionId(Integer permissionId) {
        this.permissionId = permissionId;
    }

    public Long getAppId() {
        return appId;
    }

    public void setAppId(Long appId) {
        this.appId = appId;
    }

    public String getPcode() {
        return pcode;
    }

    public void setPcode(String pcode) {
        this.pcode = pcode;
    }

    public String getPcodes() {
        return pcodes;
    }

    public void setPcodes(String pcodes) {
        this.pcodes = pcodes;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getShowStatus() {
        return showStatus;
    }

    public void setShowStatus(Integer showStatus) {
        this.showStatus = showStatus;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "CasPermission{" +
                "permissionId=" + permissionId +
                ", appId=" + appId +
                ", pcode=" + pcode +
                ", pcodes=" + pcodes +
                ", name=" + name +
                ", type=" + type +
                ", url=" + url +
                ", level=" + level +
                ", sort=" + sort +
                ", icon=" + icon +
                ", showStatus=" + showStatus +
                ", status=" + status +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                "}";
    }
}
